package com.supinfo.food.dao.jpa;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class ManagerDAO {

	private static EntityManager entityManager;
	
	public static EntityManager		getEntityManager() {
		if (entityManager == null) {
			EntityManagerFactory factory = Persistence.createEntityManagerFactory("YouFood");
			entityManager = factory.createEntityManager();
		}
		return entityManager;
	}
	
}
